<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="Bookmark" href="/favicon.ico" >
    <link rel="Shortcut Icon" href="/favicon.ico" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="/lib/html5shiv.js"></script>
    <script type="text/javascript" src="/lib/respond.min.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="/h-ui.admin/css/style.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <script type="text/javascript" src="/js/vue/vue.min.js"></script>
    <link rel="stylesheet" href="/js/laypage/skin/laypage.css">
    <script type="text/javascript" src="/js/laypage/laypage.js"></script>
    <title>供应商应付欠款</title>
    <style>
        .money{
            font-size: 16px;
        }
    </style>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> <a href="/billManagement/fund_provider_debt/toFpd">供应商应付欠款</a> <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
    <div class="text-c">
        <input type="text" class="input-text" style="width:400px" placeholder="输入供应商编号、供应商名称、联系人、联系电话" id="fpdNumList" name="fpdNumList">
        <button type="submit" class="btn btn-success" id="findFpd" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
    </div>
    <div class="cl pd-5 bg-1 bk-gray mt-20" data-validator-option="{theme:'simple_right'}">
        <span class="l"><a href="javascript:;" id="daoFpd" class="btn btn-success radius"><i class="Hui-iconfont">&#xe644;</i> Excel导出</a></span>
        &nbsp;&nbsp;<a href="/billManagement/fund_provider_debt/toAdd" id="addFpdBtn" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 新增付款</a>
        <span class="r">共有数据：<strong id="strong"></strong> 条</span>
    </div>

    <div class="whiteBox" style="overflow: hidden;height: 50px">
        <div style="height: 30px"></div>
        <span class="font999">全部</span>
    </div>
    <!-- whiteBox -->
    <div class="fl wf100" style="border-top: 3px solid #b2b2b2;font-size: 16px;height: 100px;margin-top: 15px;padding-top: 15px">
        <table id="totalDataTable" class="expertSearch " border="0" cellpadding="5" cellspacing="0" width="100%">
            <tbody><tr>
                <td align="center" valign="middle">应付欠款</td>
                <td class="font18" align="center" valign="middle">=</td>
                <td id="initReceAmtTd" align="center" valign="middle">期初欠款</td>
                <td class="font18" align="center" valign="middle">-</td>
                <td align="center" valign="middle">支付欠款</td>
                <td class="font18" align="center" valign="middle">-</td>
                <td align="center" valign="middle">优惠</td>
                <td class="font18 free" align="center" valign="middle">-</td>
                <td class="free" align="center" valign="middle">
                    抵消欠款
                    <span class="helpinfo" onmouseover="$(this).children().show()" onmouseout="$(this).children().hide()">
						<span class="tips" style="display: none;left:-50px">
							<h2 style="margin-left: 128px;"></h2>
							<h1>与关联供应商抵消的欠款，在客户资料里可以选择关联供应商</h1>
						</span>
					</span>
                </td>
            </tr>
            <tr th:height="20px"></tr>
            <tr>
                <td class="font18 fontRed" align="center" valign="middle">
                    <span id="receivables" class="money" th:text="${session.countList.fpdReceive}"></span>
                </td>
                <td align="center" valign="middle">&nbsp;</td>
                <td class="font18" align="center" valign="middle">
                    <span id="initamt" class="money" th:text="${session.countList.fpdBegin}"></span>
                </td>
                <td align="center" valign="middle">&nbsp;</td>
                <td class="font18" align="center" valign="middle">
                    <span id="totalreceiveamted" class="money" th:text="${session.countList.fpdPay}"></span>
                </td>
                <td align="center" valign="middle">&nbsp;</td>
                <td class="font18" align="center" valign="middle">
                    <span id="totalfavamt" class="money" th:text="${session.countList.fpdDiscount}"></span>
                </td>
                <td class="free" align="center" valign="middle">&nbsp;</td>
                <td class="font18 free" align="center" valign="middle">
                    <span id="offsetarrears" class="money" th:text="${session.countList.fpdOffset}"></span>
                </td>
            </tr>
            </tbody></table>
    </div>
    <table class="table table-border table-bordered table-bg" id="app">
        <thead>
        <tr>
            <th scope="col" colspan="9">供应商应付欠款列表</th>
        </tr>
        <tr class="text-c">
            <th width="40">ID</th>
            <th width="100">操作</th>
            <th width="150">供应商编号</th>
            <th width="150">供应商名称</th>
            <th width="150">联系人</th>
            <th width="150">联系电话</th>
            <th width="150">期初欠款(元)</th>
            <th width="150">支付欠款(元)</th>
            <th width="150">优惠欠款(元)</th>
            <th width="150">抵消欠款(元)</th>
            <th width="150">应付欠款(元)</th>
        </tr>
        </thead>
        <tbody>
        <tr class="text-c" v-for="(item,index) in result">
            <td>{{index+1}}</td>
            <td class="td-manage">
                <a title="详情" @click="editEvent(item.fpdName)" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe623;</i></a>
            </td>
            <td>{{item.fpdNumList}}</td>
            <td>{{item.fpdName}}</td>
            <td>{{item.fpdLinkman}}</td>
            <td>{{item.fpdTelephone}}</td>
            <td>{{item.fpdBeginDebt}}</td>
            <td>{{item.fpdPayDebt}}</td>
            <td>{{item.fpdDiscount}}</td>
            <td>{{item.fpdOffsetDeb}}</td>
            <td>{{item.fpdReceivable}}</td>
        </tr>
        </tbody>
    </table>
    <div id="pagenav" style="text-align: center;position:fixed;margin-top:150px;left:0;right:0"></div>
</div>
<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
    var app = new Vue({
        el:'#app',
        data:{
            result:[]
        }
    });
    var getFpdPageList = function(curr) {
        $.ajax({
            type:'get',
            dataType:'json',
            url:'/billManagement/fund_provider_debt/selectFpdPage',
            data:{
                current: curr || 1,
                size:5,
                fpdNumList:$("#fpdNumList").val()
            },
            success:function(msg){
                $("#strong").html(msg.total);
                app.result = msg.list;
                laypage({
                    cont:'pagenav',
                    pages:msg.pages,
                    first:'首页',
                    last:'尾页',
                    skin: '#00A0E9',
                    curr: curr || 1,
                    jump: function (obj, first) {
                        if (!first) {
                            getFpdPageList(obj.curr);
                        }
                    }
                });
            }
        });
    };
    getFpdPageList();
    /*搜索*/
    $("#findFpd").click(function () {
        getFpdPageList();
    });
    var editEvent = function(fpdName){
        window.location.href="/billManagement/fund_provider_debt/fpdDetail?fcddFcdName="+fpdName;
    };
    /*Excel导出*/
    $("#daoFpd").click(function () {
        window.location.href="/billManagement/fund_provider_debt/export";
    })
</script>
</body>
</html>